3.1342 \(\int \frac{(A+B x) (d+e x)}{(a+c x^2)^2} \, dx\)

Optimal. Leaf size=79 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)}{2 a^{3/2} c^{3/2}}-\frac{a (A e+B d)-x (A c d-a B e)}{2 a c \left (a+c x^2\right )} \]

[Out]

-(a*(B*d + A*e) - (A*c*d - a*B*e)*x)/(2*a*c*(a + c*x^2)) + ((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*a^
(3/2)*c^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0320804, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {778, 205} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)}{2 a^{3/2} c^{3/2}}-\frac{a (A e+B d)-x (A c d-a B e)}{2 a c \left (a+c x^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x))/(a + c*x^2)^2,x]

[Out]

-(a*(B*d + A*e) - (A*c*d - a*B*e)*x)/(2*a*c*(a + c*x^2)) + ((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*a^
(3/2)*c^(3/2))

Rule 778

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((a*(e*f + d*g) -
(c*d*f - a*e*g)*x)*(a + c*x^2)^(p + 1))/(2*a*c*(p + 1)), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(2*a*c*(p + 1)),
Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && LtQ[p, -1]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{(A+B x) (d+e x)}{\left (a+c x^2\right )^2} \, dx &=-\frac{a (B d+A e)-(A c d-a B e) x}{2 a c \left (a+c x^2\right )}+\frac{(A c d+a B e) \int \frac{1}{a+c x^2} \, dx}{2 a c}\\ &=-\frac{a (B d+A e)-(A c d-a B e) x}{2 a c \left (a+c x^2\right )}+\frac{(A c d+a B e) \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right )}{2 a^{3/2} c^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.0772702, size = 78, normalized size = 0.99 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)}{2 a^{3/2} c^{3/2}}+\frac{-a A e-a B d-a B e x+A c d x}{2 a c \left (a+c x^2\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x))/(a + c*x^2)^2,x]

[Out]

(-(a*B*d) - a*A*e + A*c*d*x - a*B*e*x)/(2*a*c*(a + c*x^2)) + ((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(2*
a^(3/2)*c^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 86, normalized size = 1.1 \begin{align*}{\frac{1}{c{x}^{2}+a} \left ({\frac{ \left ( Acd-aBe \right ) x}{2\,ac}}-{\frac{Ae+Bd}{2\,c}} \right ) }+{\frac{Ad}{2\,a}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{Be}{2\,c}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)/(c*x^2+a)^2,x)

[Out]

(1/2*(A*c*d-B*a*e)/a/c*x-1/2*(A*e+B*d)/c)/(c*x^2+a)+1/2/a/(a*c)^(1/2)*arctan(x*c/(a*c)^(1/2))*A*d+1/2/c/(a*c)^
(1/2)*arctan(x*c/(a*c)^(1/2))*B*e

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.79371, size = 485, normalized size = 6.14 \begin{align*} \left [-\frac{2 \, B a^{2} c d + 2 \, A a^{2} c e +{\left (A a c d + B a^{2} e +{\left (A c^{2} d + B a c e\right )} x^{2}\right )} \sqrt{-a c} \log \left (\frac{c x^{2} - 2 \, \sqrt{-a c} x - a}{c x^{2} + a}\right ) - 2 \,{\left (A a c^{2} d - B a^{2} c e\right )} x}{4 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}, -\frac{B a^{2} c d + A a^{2} c e -{\left (A a c d + B a^{2} e +{\left (A c^{2} d + B a c e\right )} x^{2}\right )} \sqrt{a c} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) -{\left (A a c^{2} d - B a^{2} c e\right )} x}{2 \,{\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a)^2,x, algorithm="fricas")

[Out]

[-1/4*(2*B*a^2*c*d + 2*A*a^2*c*e + (A*a*c*d + B*a^2*e + (A*c^2*d + B*a*c*e)*x^2)*sqrt(-a*c)*log((c*x^2 - 2*sqr
t(-a*c)*x - a)/(c*x^2 + a)) - 2*(A*a*c^2*d - B*a^2*c*e)*x)/(a^2*c^3*x^2 + a^3*c^2), -1/2*(B*a^2*c*d + A*a^2*c*
e - (A*a*c*d + B*a^2*e + (A*c^2*d + B*a*c*e)*x^2)*sqrt(a*c)*arctan(sqrt(a*c)*x/a) - (A*a*c^2*d - B*a^2*c*e)*x)
/(a^2*c^3*x^2 + a^3*c^2)]

________________________________________________________________________________________

Sympy [A]  time = 1.1791, size = 133, normalized size = 1.68 \begin{align*} - \frac{\sqrt{- \frac{1}{a^{3} c^{3}}} \left (A c d + B a e\right ) \log{\left (- a^{2} c \sqrt{- \frac{1}{a^{3} c^{3}}} + x \right )}}{4} + \frac{\sqrt{- \frac{1}{a^{3} c^{3}}} \left (A c d + B a e\right ) \log{\left (a^{2} c \sqrt{- \frac{1}{a^{3} c^{3}}} + x \right )}}{4} - \frac{A a e + B a d + x \left (- A c d + B a e\right )}{2 a^{2} c + 2 a c^{2} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x**2+a)**2,x)

[Out]

-sqrt(-1/(a**3*c**3))*(A*c*d + B*a*e)*log(-a**2*c*sqrt(-1/(a**3*c**3)) + x)/4 + sqrt(-1/(a**3*c**3))*(A*c*d +
B*a*e)*log(a**2*c*sqrt(-1/(a**3*c**3)) + x)/4 - (A*a*e + B*a*d + x*(-A*c*d + B*a*e))/(2*a**2*c + 2*a*c**2*x**2
)

________________________________________________________________________________________

Giac [A]  time = 1.18991, size = 100, normalized size = 1.27 \begin{align*} \frac{{\left (A c d + B a e\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{2 \, \sqrt{a c} a c} + \frac{A c d x - B a x e - B a d - A a e}{2 \,{\left (c x^{2} + a\right )} a c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)/(c*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(A*c*d + B*a*e)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a*c) + 1/2*(A*c*d*x - B*a*x*e - B*a*d - A*a*e)/((c*x^2 +
a)*a*c)